package com.kinsin.kinsinutils

import android.app.Application
import com.kinsin.kinsinutil.NetworkStateMonitor
import com.kinsin.kinsinutil.NeverCrash

class MyApp : Application(){

    override fun onCreate() {
        super.onCreate()
        // 网络监听初始化
        NetworkStateMonitor.getInstance(this)

        NeverCrash
            .setDebugMode(true)
            .setMainCrashHandler { thread, ex -> /* 处理主线程异常 */ }
            .setUncaughtCrashHandler { thread, ex -> /* 处理子线程异常 */ }
            .register()
    }

}